package com.ssy.lingxi.report.api.enums;

import java.util.Arrays;

/**
 * 店铺操作类型
 * @author 伍将
 * @date 2020/11/25
 * @version 2.0.0
 */
public enum ShopOperateTypeEnum {
    /**
     * 新增
     */
    ADD(1, "新增", "");

    /**
     * 编码
     */
    private final Integer code;
    /**
     * 名称
     */
    private final String name;
    /**
     * 链接
     */
    private final String link;


    ShopOperateTypeEnum(Integer code, String name, String link) {
        this.code = code;
        this.name = name;
        this.link = link;
    }

    public static ShopOperateTypeEnum getEnum(Integer code) {
        return Arrays.stream(ShopOperateTypeEnum.values()).filter(e -> e.getCode().equals(code)).findFirst().orElse(null);
    }


    public Integer getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public String getLink() {
        return link;
    }
}
